Dynamicweb 8 Documentation
PreparePrices(Dictionary<Product,Double>) Method
Example 

The products.
Prepares the prices.
Syntax
'Declaration
 
Public Overloads Shared Sub PreparePrices( _ 
   ByVal Products As Dictionary(Of Product,Double) _ 
) 
public static void PreparePrices( 
   Dictionary<Product,double> Products 
)

Parameters

Products
The products.
Example
class MyPage : System.Web.UI.Page
{
    private void PreparePrices(Order order)
    {
        //Prepare prices
        Dictionary<Product, double> prods = new Dictionary<Product, double>();
        foreach (OrderLine ol in order.OrderLines)
        {
            if (ol.Type == Base.ChkString(Base.ChkInteger(OrderLine.OrderLineType.Product)) && !prods.ContainsKey(ol.Product))
            {
                prods.Add(ol.Product, ol.Quantity);
            }
        }
        Dynamicweb.eCommerce.Prices.PriceManager.PreparePrices(prods);

        //Find discounts
        Dynamicweb.eCommerce.Frontend.Cart.CartCatch.FindDiscount();
    }
}
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

PriceManager Class
PriceManager Members
Overload List

Send Feedback